using System;
using System.Collections.Generic;
using UnityEngine;

namespace Entities
{
	public class Players
	{
		private static Players instance;
		
		private Dictionary<GameObject, Player> players;
	
		private Players ()
		{
			players = new Dictionary<GameObject, Player>();
		}
	
		public static Players Instance {
			get {
				if (instance == null) {
					instance = new Players ();
				}
				return instance;
			}
		}
		
		public void addPlayer(Player player){
			players.Add(player.getGameObject(), player);	
		}
		
		public Player getPlayer(GameObject obj){
			return players[obj];	
		}
	}
	
}

